<template>
  <div class="container">
    <div class="tabsNew">
      <el-tabs v-model="activeName" @tab-click="handleClick" class="weightTabs">
        <el-tab-pane label="驾校" name="jxzy" :lazy="true">
          <driverSchool v-if="activeName == 'jxzy'"></driverSchool>
        </el-tab-pane>
        <el-tab-pane label="学校" name="xuex" :lazy="true">
          <school v-if="activeName == 'xuex'"></school>
        </el-tab-pane>
        <el-tab-pane label="报名点" name="bmd" :lazy="true">
          <enrollPoint v-if="activeName == 'bmd'"></enrollPoint>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script type="text/javascript">
import driverSchool from "./driverSchool";
import school from "./school";
import enrollPoint from "./enrollPoint";

import checkPermission from "@/utils/permission"; // 权限判断函数
export default {
  data() {
    return {
      activeName: "jxzy",
    };
  },
  components: {
    driverSchool,
    school,
    enrollPoint,
  },
  methods: {
    checkPermission,
    handleClick(tab, event) {
      this.activeName = tab.name;
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep {
  .is-active {
    font-weight: bold;
  }
  .weightTabs .el-tabs__item {
    font-size: 16px;
  }
  .el-tabs__header {
    margin: 0;
  }
}
</style>
